Demo4 Demo 4 - Multiple Selection Form15 Frame1 Combo1 Command2 Execute Label2 Clicking "Execute" add marks for all records which match the expression below. Some common expressions are provided in the combo dropdown. MS Sans Serif Command1 Clear All MarkScroll Table1 TgDemo MS Sans Serif First First Opus.Last Opus.Last Country Country Data1M Data1% dBASE IV;database=. Sselect * from composer, opus, composer inner join opus on composer.last = opus.last Composers and Compositions Line1 Label1 Select records by moving to the left grid margin and clicking. You can use the scrollbar above to move between records you've selected. MS Sans Serif SelectMsg No rows are selected. Form_Load Form_Unload Cancel QuitCurrentDemo Command1_Click Command2_Click Data1G Recordset Command3_Click Command4_Click Command5_Click Command6_Click Command7_Click Table1_Click UpdateSelectMessageV Table1 BookmarkCount SelectMsg Caption Table1_MarkChange IsMarked UpdateSelectMesssage SelectMsg_Clicks MarkScroll MarkScroll_Change Value Bookmarki BookmarkList SetSelectMessage RecordCount Frame1_DragDrop Source Control Combo1_Change dclone Dynaset findErr NoMatch Quote ListCount Screen MousePointer HOURGLASS DEFAULT Command1_Click Clear all of the selected rows. BookmarkList willr be empty after BookmarkCount is set to zero.t Command2_Click Loop through the set and find all records which match the criteria specified in (Expr.Text).i We use a clone so that we don't move the actual record position of the displayed data.h For each matching record, add the bookmark to the bookmarklist of the grid. The grid will assure that these items will be highlighted. Note that the bookmarks of a clone are compatible with the original set. This is ONLY true of clones.e If the expression wasn't in the "quickpick" list of expressions, then add it. This isn't really relevant to the demo, but just here as a convenience feature.t Expression Syntax Error Form_Load The Data1 control actually contains a JOINed set of two databases. We perform a refresh and MoveLast or else VB3/Access won't know how many records there are (since the JOIN won't be completed yet). This is CORRECTs behavior, and the code below is necessary to assure that the JOIN completes before we do anything else. force RecordCount to update We really want to be at the first record when the form first pops up. Add common items to the combo box Country = Germany Country = France Country = United States Instr(Opus, Symphony ) > 0 Instr(Opus, Sonata ) > 0 Instr(Opus, Concerto ) > 0 First = George Form_Unload MarkScroll_Change When the scroll bar is moved, we select a bookmark from the BookmarkList and set the Data control'sr position. TrueGrid automatically responds and' we need tell it nothing.m Table1_MarkChange This event is sent when the user selects (marks) a row in the grid, or unmarks one. The IsMarkeds argument specifies what the CURRENT state of the row is. In our case, the UpdateSelectMessage routine just displays the new BookmarkCount, so we needn't worry about the individual row selected. UpdateSelectMessage A message is displayed below the grid which indicates (a) how many rows are marked and (b) how many records there are. This routine keeps that area up tor date. No rows are selected There is 1 row selected There are rows selected out of